From: Jasper St. Pierre Date: Thu, 23 Jan 2014 21:02:19 +0000 (-0500) Subject: network: Use NMDevice.get_available_connections(); for NMWirelessDialog X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2880 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a36bfced473d48ffe70150ad5537bb82b1ead8e8;p=gnome-shell.git network: Use NMDevice.get_available_connections(); for NMWirelessDialog It's a lot simpler and doesn't require us routing the NMRemoteSettings all the way through. It's still a bit complicated to do this for the usual connections, so let's drop it for now. --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 489d5335a..25c352bc6 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -609,7 +609,7 @@ const NMWirelessDialog = new Lang.Class({ Name: 'NMWirelessDialog', Extends: ModalDialog.ModalDialog, - _init: function(client, device, settings) { + _init: function(client, device) { this.parent({ styleClass: 'nm-dialog' }); this._client = client; @@ -618,10 +618,7 @@ const NMWirelessDialog = new Lang.Class({ this._networks = []; this._buildLayout(); - let connections = settings.list_connections(); - this._connections = connections.filter(Lang.bind(this, function(connection) { - return device.connection_valid(connection); - })); + this._connections = device.get_available_connections(); this._apAddedId = device.connect('access-point-added', Lang.bind(this, this._accessPointAdded)); this._apRemovedId = device.connect('access-point-removed', Lang.bind(this, this._accessPointRemoved)); @@ -971,10 +968,9 @@ const NMDeviceWireless = new Lang.Class({ Name: 'NMDeviceWireless', category: NMConnectionCategory.WIRELESS, - _init: function(client, device, settings) { + _init: function(client, device) { this._client = client; this._device = device; - this._settings = settings; this._description = ''; @@ -1042,7 +1038,7 @@ const NMDeviceWireless = new Lang.Class({ }, _showDialog: function() { - this._dialog = new NMWirelessDialog(this._client, this._device, this._settings); + this._dialog = new NMWirelessDialog(this._client, this._device); this._dialog.connect('closed', Lang.bind(this, this._dialogClosed)); this._dialog.open(); },